<?php
	$list = $_->cmt->_select('',array('DESC'=>'addtime'));
	if($list):
		foreach($list as $val)
		{
			if($val['tid'])
			{
				$data[$val['id']][$val['cid']] = $val;
			}else{
				$data[$val['cid']][$val['id']] = $val;
			}
		}
	
	krsort($data);
	foreach($data as &$val)
	{
		ksort($val);
	}
	endif;
	$smarty->_assign(array('data'));
	$smarty->_display();
?>